<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="com.beans.AdminInfo" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">
    <meta charset="UTF-8">
    <title></title>

    <link rel="stylesheet" type="text/css" href="css/top.css">
    <script type="text/javascript" src="js/jquery-1.8.0.js"></script>
    <script>
        $(function () {
            setInterval("refreshTime()", 1000);
        });


        function refreshTime() {
            $.ajax({
                type: "post",
                url: "AdminServlet.do?flag=refresDate",
                cache: false,
                success: function (time) {
                    $("#div_date").html(time);
                }

            });
        }
    </script>
</head>
<%
    AdminInfo admin = (AdminInfo) request.getSession().getAttribute("session_admin");
    String state = ("1".equals(admin.getState()))?"正常":"非法用户";
    request.setAttribute("state",state);
%>
<body>
<table id="t_head">
    <tr>
        <td id="td1"></td>
        <td id="td2">&nbsp;</td>
        <td id="td3">
            <a id="td3_a1" target="centerFrame" href="admin/password_edit.jsp"><img src="images/btn_head_bg1.jpg"/>修改密码</a>
            <a target="centerFrame" href="admin/admin_info.jsp"><img src="images/btn_head_bg1.jpg"/>用户信息</a>
            <a href="AdminServlet.do?flag=logout" target="_parent" id="logout" onclick="return confirm('确定登出吗')"><img
                    src="images/btn_head_bg1.jpg"/>退出系统</a>
        </td>

    </tr>
</table>
<table id="t_bar">
    <tr>
        <td id="bar_td1"></td>
        <td id="bar_td2">
            <div id="div_date"><%=new SimpleDateFormat("yyyy-MM-dd E HH:mm:ss").format(new Date())%></div>
        </td>

        <td id="bar_td3">
            商城后台管理系统
        </td>

    </tr>
</table>
<table id="t_title">
    <tr>
        <td id="title_td1">
            <img src="images/main_28.gif"/>
        </td>
        <td id="title_td2"><img src="images/main_29.gif"/></td>
        <td id="title_td3"><img src="images/main_30.gif"/></td>
        <td id="title_td4">&nbsp;
            <label class="admininfo">当前登录用户: ${sessionScope.session_admin.adminName} 用户状态 : ${state}
            </label>
        </td>
        <td id="title_td5"><img src="images/main_32.gif"/></td>
    </tr>
</table>
</body>
</html>
